﻿package mortal.game.view.copy.guildCopy.renderer
{
    import Message.Public.*;
    import com.mui.controls.*;
    import com.mui.display.*;
    import flash.text.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class GuildCopyHurtListCellRenderer extends GCellRenderer
    {
        private var _txtRank:GTextFiled;
        private var _txtName:GTextFiled;
        private var _txtHurtValue:GTextFiled;

        public function GuildCopyHurtListCellRenderer()
        {
            return;
        }// end function

        override protected function initSkin() : void
        {
            var _loc_1:* = new GBitmap();
            var _loc_2:* = UIFactory.bg(0, 0, 300, 48, null, ImagesConst.SelectBg);
            this.setStyle("downSkin", _loc_2);
            this.setStyle("overSkin", _loc_2);
            this.setStyle("upSkin", _loc_1);
            this.setStyle("selectedDownSkin", _loc_2);
            this.setStyle("selectedOverSkin", _loc_2);
            this.setStyle("selectedUpSkin", _loc_2);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            var _loc_1:* = GlobalStyle.textFormatPutong;
            _loc_1.align = TextFormatAlign.CENTER;
            this._txtRank = UIFactory.textField("", 5, 0, 30, 20, this, _loc_1);
            this._txtName = UIFactory.textField("", 30, 0, 103, 20, this, _loc_1);
            var _loc_2:* = GlobalStyle.textFormatLv;
            _loc_2.align = TextFormatAlign.RIGHT;
            this._txtHurtValue = UIFactory.textField("", 105, 0, 118, 20, this, _loc_2);
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._txtRank.dispose(param1);
            this._txtName.dispose(param1);
            this._txtHurtValue.dispose(param1);
            this._txtRank = null;
            this._txtName = null;
            this._txtHurtValue = null;
            return;
        }// end function

        override public function set data(param1:Object) : void
        {
            super.data = param1;
            var _loc_2:* = param1 as SGuildBossPlayerHurtInfo;
            if (_loc_2)
            {
                this._txtRank.text = _loc_2.rank.toString();
                this._txtName.text = _loc_2.username;
                this._txtHurtValue.text = _loc_2.hurt.toString();
            }
            else
            {
                this._txtRank.text = "";
                this._txtName.text = "";
                this._txtHurtValue.text = "";
            }
            return;
        }// end function

        override public function get data() : Object
        {
            return super.data;
        }// end function

        override public function set label(param1:String) : void
        {
            return;
        }// end function

    }
}
